home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / pc_pad.arc / AMERIC.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1984-07-08  |  3.8 KB  |  109 lines

  1. 10  ' File: AMERIC.BAS
  2. 20  '
  3. 30  ' ** NATIONS AND CAPITALS OF THE AMERICAS **
  4. 40  '
  5. 50  FOR N=1 TO VAL(RIGHT$(TIME$,2)):X=RND:NEXT N
  6. 60  M$="  NATIONS AND CAPITALS OF THE AMERICAS"+CHR$(13)+STRING$(40,42)
  7. 70  SCREEN 0,0,0:COLOR 7,0,0:WIDTH 40:KEY OFF:CLS:PRINT M$
  8. 80  PRINT:PRINT "This tutorial, multiple-choice program
  9. 90  PRINT "challenges you to learn and recall the
  10. 100  PRINT "capital cities of the nations of the
  11. 110  PRINT "Americas -- North, Central and South
  12. 120  PRINT "America.":PRINT
  13. 130  PRINT "The program continues repeating a ques-
  14. 140  PRINT "tion as long as you are making in-
  15. 150  PRINT "correct responses. Watch the selections
  16. 160  PRINT "change somewhat with each incorrect
  17. 170  PRINT "response, however -- the changes pro-
  18. 180  PRINT "vide clues to the correct answer.
  19. 190  LOCATE 24,1:PRINT "Strike any key to begin ...";
  20. 200  DEF SEG=0:POKE 1050,PEEK(1052)
  21. 210  K$=INKEY$:IF K$="" THEN 210
  22. 220  CLS:PRINT M$
  23. 230  DIM I$(38,4)
  24. 240  FOR X=1 TO 38:READ N:FOR Y=1 TO 4:READ I$(X,Y):NEXT Y:NEXT X
  25. 250  X=INT(38*RND)+1
  26. 260  FOR N=1 TO 3:Q$(N)=I$(X,N+1):NEXT N
  27. 270  Q$(4)=I$(INT(38*RND)+1,INT(3*RND)+2)
  28. 280  FOR N=1 TO 3
  29. 290  IF Q$(4)=Q$(N) THEN 270
  30. 300  NEXT N
  31. 310  Q$(5)="None of the above"
  32. 320  CR=INT(4*RND)+1
  33. 330  FOR N=1 TO 4
  34. 340  C=0
  35. 350  R$(N)=Q$(INT(4*RND)+1)
  36. 360  C=C+1:IF C < 10 THEN 390
  37. 370  LOCATE 3,1:COLOR 23,0
  38. 380  PRINT "PLEASE WAIT ...":COLOR 7,0
  39. 390  IF N=1 THEN 430
  40. 400  FOR Y=1 TO N-1
  41. 410  IF R$(Y)=R$(N) THEN 350
  42. 420  NEXT Y
  43. 430  NEXT N
  44. 440  R$(5)=Q$(5)
  45. 450  CLS:PRINT M$
  46. 460  PRINT "Which of the following is the capital of"
  47. 470  PRINT I$(X,1)" (1-5)?":PRINT
  48. 480  FOR N=1 TO 5:PRINT TAB(5)N"- "R$(N):NEXT N:PRINT
  49. 490  K$=INKEY$:IF K$="" THEN 490
  50. 500  IF K$<"1" OR K$>"5" THEN 490
  51. 510  PRINT K$
  52. 520  NT=NT+1
  53. 530  IF R$(VAL(K$))=I$(X,2) THEN 550
  54. 540  PRINT:PRINT "Sorry, that is not correct.":GOSUB 570:GOTO 260
  55. 550  PRINT:PRINT "That is correct."
  56. 560  NC=NC+1:GOSUB 570:GOTO 250
  57. 570  COLOR 0,7
  58. 580  LOCATE 17,1
  59. 590  SC=INT(100*NC/NT)
  60. 600  PRINT NC"correct out of"NT;SPC(32-POS(0))
  61. 610  PRINT
  62. 620  PRINT SPC(1)"for a score of"SC"%"SPC(32-POS(0))
  63. 630  COLOR 7,0
  64. 640  LOCATE 20,1
  65. 650  PRINT "Strike the SPACE BAR to continue (or ";
  66. 660  PRINT "the X key to end the quiz) ...";
  67. 670  K$=INKEY$:IF K$="" THEN 670
  68. 680  IF K$=CHR$(32) THEN RETURN 
  69. 690  IF K$="X" OR K$="x" THEN WIDTH 80:END
  70. 700  GOTO 670
  71. 710  DATA 1,Antigua and Barbuda,St. John's,Codrington,Falmouth
  72. 720  DATA 2,The Bahamas,Nassau,Freeport,Andras I.
  73. 730  DATA 3,Barbados,Bridgetown,Mt. Hillaby,Speightstown
  74. 740  DATA 4,Belize,Belize City,Stann Creek,Corozal
  75. 750  DATA 5,Bermuda,Hamilton,Saint George,Somerset I.
  76. 760  DATA 6,Canada,Ottawa,Montreal,Toronto
  77. 770  DATA 7,Costa Rica,San Jose,Alajuela,Cartago
  78. 780  DATA 8,Cuba,Havana,Santiago de Cuba,Camaguey
  79. 790  DATA 9,Dominica,Roseau,Portsmouth,Layou
  80. 800  DATA 10,Dominican Republic,Santo Domingo,Moca,Las Matas             
  81. 810  DATA 11,El Salvador,San Salvador,Santa Ana,Sonsonate
  82. 820  DATA 12,Greenland,Nuuk,Angmagssalik,Thule
  83. 830  DATA 13,Grenada,St. George's,Carriacon Island,Petit Martinique Island
  84. 840  DATA 14,Guatemala,Guatemala City,Puerto Barrios,Amatitian
  85. 850  DATA 15,Haiti,Port-au-Prince,Cap-Haitien,Saint-Marc
  86. 860  DATA 16,Honduras,Tegucigalpa,San Pedro Sula,La Ceiba
  87. 870  DATA 17,Jamaica,Kingston,Port Maria,Savanna Ia Mar
  88. 880  DATA 18,Mexico,Mexico City,Guadalajara,Monterrey
  89. 890  DATA 19,Netherlands Antilles,Willemstad,Curacao,Aruba
  90. 900  DATA 20,Nicaragua,Managua,Leon,Chinandega
  91. 910  DATA 21,Panama,Panama,Colon,La Chorrera
  92. 920  DATA 22,Saint Kitts-Nevis,Basseterre,Saint Christopher,Nevis
  93. 930  DATA 23,Saint Lucia,Castries,Soufriere,Vieux Fort
  94. 940  DATA 24,Saint Vincent and the Grenadines,Kingstown,Georgetown,Canouan
  95. 950  DATA 25,Trinidad and Tobago,Port-of-Spain,San Fernando,Trinidad
  96. 960  DATA 26,United States of America (USA),Washington D.C.,New York City,Chicago   
  97. 970  DATA 27,Argentina,Buenos Aires,Cordoba,La Plata
  98. 980  DATA 28,Bolivia,LaPaz,Santa Cruz,Cochabamba 
  99. 990  DATA 29,Brazil,Brasillia,Salvador,Porto Alegre
  100. 1000  DATA 30,Chile,Santiago,Valparaiso,Concepcion
  101. 1010  DATA 31,Colombia,Bogota,Medellin,Cali
  102. 1020  DATA 32,Ecuador,Quito,Guayoquil,Cuenca
  103. 1030  DATA 33,Guyana,Georgetown,Mahaica,Skeldon
  104. 1040  DATA 34,Paraguay,Asuncion,San Pedro,Concepcion 
  105. 1050  DATA 35,Peru,Lima,Pisco,Iquitos
  106. 1060  DATA 36,Suriname,Paramaribo,Nieuw,Nickerie
  107. 1070  DATA 37,Uraguay,Montevideo,Melo,Paysandu
  108. 1080  DATA 38,Venezuela,Caracas,Maracaibo,Valencia
  109.